class book:
    #book类构造方法，设置No,isbn,name,author,price三个属性
    def __init__(self, No, isbn, name, author, price):
        self.序号 =No
        self.书号 =isbn
        self.书名 =name
        self.作者 =author
        self.价格 =price
    def ouput(self):
        #items()函数以列表返回可遍历的键、值
        for attr in self.__dict__.items():
            print("{0}: {1}".format(attr[0], attr[1]))
if __name__ == '__main__':
    book1 = book("01","123-456-789","鬼吹灯","逍遥子",20.5)#创建book类对象
    book1.ouput()
